import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   label: '态势感知',
  //   component: () => import(/* webpackChunkName: "Home" */ '../views/abxx/Tsgz/Tsgzi.vue'),
  //   icon: require('../assets/imgs/menu-1.png')
  // },

  {
    path: '/Dtgj',
    name: 'Dtgj',
    label: '地铁公交通用信息',
    component: () => import(/* webpackChunkName: "Index" */ '../views/Index.vue'),
    icon: require('../assets/imgs/menu-3.png'),
    redirect: '/gjdtty/zdry',
    children: [

      {
        path: 'zdry',
        name: 'zdry',
        label: '重点人员',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/zdry.vue')
      },
      {
        path: 'abry',
        name: 'abry',
        label: '安保人员',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/abry.vue')
      },
      {
        path: 'qwll',
        name: 'qwll',
        label: '勤务力量',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/qwll.vue')
      },
      {
        path: 'asj',
        name: 'asj',
        label: '案事件',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/asj.vue')
      },
      {
          path: 'jqxx',
          name: 'jqxx',
          label: '警情信息',
          component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/jqxx.vue')
      },
      {
          path: 'rlyj',
          name: 'rlyj',
          label: '人脸预警',
          component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/rlyj.vue')
      },
      {
          path: 'wjp',
          name: 'wjp',
          label: '违禁品',
          component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/wjp.vue')
      },
      {
          path: 'gjgwcyry',
          name: 'gjgwcyry',
          label: '关键岗位从业人员',
          component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjdtty/gjgwcyry.vue')
      }
    ]
  },
  {
    path: '/Dtzs',
    name: 'Dtzs',
    label: '地铁专属',
    component: () => import(/* webpackChunkName: "Index" */ '../views/Index.vue'),
    icon: require('../assets/imgs/menu-3.png'),
    redirect: '/dtzs/dtxl',
    children: [

      {
        path: 'dtxl',
        name: 'dtxl',
        label: '地铁线路',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/dtzs/dtxl.vue')
      },
      {
        path: 'dtzd',
        name: 'dtzd',
        label: '地铁站点',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/dtzs/dtzd.vue')
      },
      {
        path: 'kltj',
        name: 'kltj',
        label: '客流统计',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/dtzs/kltj.vue')
      },
      {
        path: 'xgajtp',
        name: 'xgajtp',
        label: 'X光安检图片',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/dtzs/xgajtp.vue')
      }
    ]
  },
  {
    path: '/Gjzs',
    name: 'Gjzs',
    label: '公交专属',
    component: () => import(/* webpackChunkName: "Index" */ '../views/Index.vue'),
    icon: require('../assets/imgs/menu-3.png'),
    redirect: '/rygk/zdrysmzdtxx',
    children: [

      {
        path: 'gjxl',
        name: 'gjxl',
        label: '公交线路',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjzs/gjxl.vue')
      },
      {
        path: 'gjzd',
        name: 'gjzd',
        label: '公交站点',
        component: () => import(/* webpackChunkName: "Jqxx" */ '../views/gjzs/gjzd.vue')
      }
   ]
  }
]

const router = new VueRouter({
  routes
})

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

export default router
